from dotenv import load_dotenv

from LangChainModel14 import query_result

load_dotenv()

from langchain_community.embeddings import HuggingFaceBgeEmbeddings
model_name =  r'E:\\大模型\\向量模型\\BAAI\\bge-large-zh-v1.5'
encode_kwargs = {'normalize_embeddings': True}

embeddings = HuggingFaceBgeEmbeddings(
    model_name=model_name,
   encode_kwargs=encode_kwargs,
)

text = "大模型"
query_result = embeddings.embed_query(text)
print(query_result[:5])